
import QtQuick 1.0
import Qt.labs.folderlistmodel 1.0


Rectangle {
    id: window
    color: "#3E606F"
    width: 500
    height: 600
    focus: true
    /*XmlListModel {
	id: xmlModel
	source: "http://manu42.local:8084/LocalModel/findFiles.jsp?dir=/home/emugwaneza/Vidéos&filter=.avi"
	query: "/fichiers/fic"
	XmlRole { name: "name"; query: "name/string()" }
	XmlRole { name: "isDir"; query: "isDir/string()" }
	XmlRole { name: "sPath"; query: "exactPath/string()" }
    }*/
  
    FolderListModel {
	id: foldermodel
	nameFilters: ["*.avi"]
	folder:"/home/emmanuel"
	showDirs:true  
	showDotAndDotDot:true
    }
	
    ListView {
	    id: list1
	    anchors.horizontalCenter: parent.horizontalCenter
	    anchors.fill: parent
	    focus: true
            model:foldermodel
	    delegate: ListViewDelegate {}
	    spacing:20
	    
	    
	}


     Keys.onPressed: {
		if (event.key == Qt.Key_Left) {
		    console.log("previous");
		    rootContainer.previousQml();
		    console.log("pfreviousHDD");
		    //event.accepted = false;
		}
	    }   
   
        
}
